#!/bin/bash
# For all the following commands HOME should be set to the directory that has .my.cnf file with password information.
MYSQLD=`ps -e | grep -v grep |grep -c   mysqld_safe`

if [ ${MYSQLD} -lt 1 ]; then 
    exit 0
fi

mysql -V